0072ae443697605d6906eb546606ab0637c23817,Parse/src/test/java/com/parse/ParseRequestTest.java,ParseRequestTest,testDownloadProgress,#,78
Before Change
// TODO(grantland): Move to ParseAWSRequestTest or ParseCountingByteArrayHttpBodyTest
@Test
public void testDownloadProgress() throws Exception {
ParseHttpResponse mockResponse = mock(ParseHttpResponse.class);
when(mockResponse.getStatusCode()).thenReturn(200);
when(mockResponse.getContent()).thenReturn(new ByteArrayInputStream(data));
when(mockResponse.getTotalSize()).thenReturn((long) data.length);
ParseHttpClient mockHttpClient = mock(ParseHttpClient.class);
when(mockHttpClient.execute(any(ParseHttpRequest.class))).thenReturn(mockResponse);
After Change
// TODO(grantland): Move to ParseAWSRequestTest or ParseCountingByteArrayHttpBodyTest
@Test
public void testDownloadProgress() throws Exception {
ParseHttpResponse mockResponse = new ParseHttpResponse.Builder()
.setStatusCode(200)
.setTotalSize((long) data.length)
.setContent(new ByteArrayInputStream(data))
.build();
ParseHttpClient mockHttpClient = mock(ParseHttpClient.class);
when(mockHttpClient.execute(any(ParseHttpRequest.class))).thenReturn(mockResponse);